<?php


namespace App\Repositories;




use App\Models\Category;

class CategoryRepository extends Repository
{
    /**
     * Model.
     *
     * @var string
     */
    protected $eloquentClass = Category::class;


    public function all(){

        return $this->cache->rememberForever('category', function () {
            return $this->model()->with(['sub','parent'])->where('status',1)->orderBy('sort')->get();
        });
    }


}
